<cfcomponent displayname="AccessControllQueries" output="false">

    <!--- Get Access --->
    <cffunction name="funcGetAccess" returntype="query">
        <cfargument default="-1" name="AccessLevelID"  />
        
        <cfquery name="qryGetAccess" datasource="#Session.DataSourceAccessControl#">
            Select AccessLvID, Descript
            From AccessLvl
            <cfif ARGUMENTS.AccessLevelID NEQ -1>
                Where AccessLVID in (#ARGUMENTS.AccessLevelID#)
            </cfif>
            Order by Descript
        </cfquery>
        
        <cfreturn qryGetAccess />
    </cffunction>
    <!--- Get Access --->
    
    
    
    <!--- Get Access --->
    <cffunction name="funcGetAccessID" returntype="query">
        <cfargument default="-1" name="Badge"  />
        
        <cfquery name="qryGetAccessID" datasource="#Session.DataSourceAccessControl#">
            Select EmpID
            From Badge
            Where ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.Badge#" />
        </cfquery>
        
        <cfreturn qryGetAccessID />
    </cffunction>
    <!--- Get Access --->
    
    
    <cffunction name="funcUpdateAccessID" returntype="void">
        <cfargument default="-1" name="EmployeeID" required="yes" />
        <cfargument default="-1" name="AccountID"  required="yes" />
        
        <cfquery name="qryUpdateAccessID" datasource="#Session.DataSourceRosetta#">
            scf_UpdateAccessID #ARGUMENTS.EmployeeID#, #ARGUMENTS.AccountID#    
        </cfquery>
        
    </cffunction>
    
    
    
    
    
</cfcomponent>